function createRandomInt(count){
  var rand = parseInt(Math.random()*count);
  return rand;
}

function createDifferentRandomInt(max,size){
  var randList = new Array(size);

  for(var i=0;i<randList.length;){
    var rand = parseInt(Math.random()*max);
    if(!isContain(rand,randList)){
      randList[i]=rand;
      i++;
    }
  }

  return randList;
}

function isContain(num,array){
  for(var i=0;i<array.length;i++){
    if(array[i]==num){
      return true;
    }
  }
  return false;
}
